<?php

namespace App\Models;

use App\Models\traits\Morph;
use Illuminate\Contracts\Auth\Authenticatable;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\Auth;

class User extends Model implements Authenticatable
{
    use HasFactory;
    use \Illuminate\Auth\Authenticatable;
    
    protected $fillable = [
		'name',
	    'openid',
	    'email',
	    'nickname',
	    'password',
		'avatar',
		'status',
		'mobile',
    ];
    
    public function chatUser()
    {
        return $this->morphOne(ChatUser::class, 'related_table');
    }
}
